import { handle } from '../../index'

const suffix = 'api'

// 分页列表
export const sysThemeGetPageTheme = (params: any) => handle({
  url: `/${suffix}/sysTheme/getPageTheme`,
  method: 'get',
  params
})
// 新增
export const sysThemeAdd = (params: any) => handle({
  url: `/${suffix}/sysTheme/add`,
  method: 'post',
  params
})
// 编辑
export const sysThemeUpdate = (params: any) => handle({
  url: `/${suffix}/sysTheme/update`,
  method: 'post',
  params
})
// 配置
export const sysThemeStyleConfig = (params: any) => handle({
  url: `/${suffix}/sysTheme/styleConfig`,
  method: 'post',
  params
})
// 详情
export const sysThemeFind = (id: any) => handle({
  url: `/${suffix}/sysTheme/find/${id}`,
  method: 'get',
})
// 删除
export const sysThemeDelete = (id: any) => handle({
  url: `/${suffix}/sysTheme/delete/${id}`,
  method: 'get',
})
// 列表
export const sysThemeIndexFindAll = (id: any) => handle({
  url: `/${suffix}/sysThemeIndex/findAll/${id}`,
  method: 'get',
})
// 索引构成新增
export const sysThemeIndexAdd = (params: any) => handle({
  url: `/${suffix}/sysThemeIndex/add`,
  method: 'post',
  params
})
// 索引构成编辑
export const sysThemeIndexUpdate = (params: any) => handle({
  url: `/${suffix}/sysThemeIndex/update`,
  method: 'post',
  params
})
// 索引构成详情
export const sysThemeIndexFindById = (id: any) => handle({
  url: `/${suffix}/sysThemeIndex/findById/${id}`,
  method: 'get',
})
// 索引构成配置列保存
export const sysThemeIndexSaveIndexFields = (params: any) => handle({
  url: `/${suffix}/sysThemeIndex/saveIndexFields`,
  method: 'post',
  params
})
// 索引构成配置列查看
export const sysThemeIndexGetIndexFields = (params: any) => handle({
  url: `/${suffix}/sysThemeIndex/getIndexFields`,
  method: 'get',
  params
})
// 索引构成主配置
export const sysThemeIndexMainConfig = (params: any) => handle({
  url: `/${suffix}/sysThemeIndex/mainConfig`,
  method: 'post',
  params
})
// 索引构成删除
export const sysThemeIndexDelete = (id: any) => handle({
  url: `/${suffix}/sysThemeIndex/delete/${id}`,
  method: 'get',
})
// 获取当前主题
export const sysThemeGetThemeByThemeType = () => handle({
  url: `/${suffix}/sysTheme/getThemeByThemeType/1`,
  method: 'get',
})